
#include "game_model\headers\game_model_base_object.hpp"

#include "game_model\ih\game_model_iunmovable_object.hpp"

#include "game_model\ih\game_model_iobject_visitor.hpp"

namespace GameModel {


template< typename _TInterfaceType >
BaseObject< _TInterfaceType >::BaseObject( std::shared_ptr< ILocation > _startLocation, std::shared_ptr< ISize > _size, QImage* _objectPicture )
	:	m_currentLocation( _startLocation )
	,	m_size( _size )
	,	m_objectPicture( _objectPicture )
{
}


template< typename _TInterfaceType >
BaseObject< _TInterfaceType >::~BaseObject()
{
}


template< typename _TInterfaceType >
ILocation const&
BaseObject< _TInterfaceType >::getCurrentLocation() const
{
	return *m_currentLocation;
}



template< typename _TInterfaceType >
ISize const&
BaseObject< _TInterfaceType >::getSize() const
{
	return *m_size;
}


template< typename _TInterfaceType >
QImage*
BaseObject< _TInterfaceType >::getImage() const
{
	return m_objectPicture;
}


template< typename _TInterfaceType >
void
BaseObject< _TInterfaceType >::accept( IObjectVisitor& _objectVisitor )
{
	_objectVisitor.visit( *this );
}


template class BaseObject< IUnmovableObject >;


} // namespace GameModel